window.onload = function() {
	var ball_box = document.querySelector('.ball_box'),
		ball = document.querySelector('.ball');

	ball_box.style.transition = 'none';
	ball_box.addEventListener('click', function() {
		ball_box.style.transition = '';
		ball.classList.add('ball_rotate');
		ball_box.style.transform = 'translateX(-50%) translateY(-50%) scale(0.1)';

		ball_box.addEventListener('transitionend', end);

		function end() {
			window.open('game.html', '_self');
			ball_box.removeEventListener('transitionend', end);
		}
	});
};